<template>
  <div style="padding:  10px 0">
    <el-table :data="ruleForm.returnCarDepositOrderVoList" border>

      <el-table-column align="center" show-overflow-tooltip  label="订单号" min-width="230">
        <template #default="{row}">
          <el-button type="text" @click="handleTo(row.orderCarNo)"> {{ row.orderCarNo || '-' }}</el-button>
        </template>
      </el-table-column>

      <el-table-column align="center" label="还车状态" min-width="130" prop="customerName">
        <template #default="{row}">
          {{ selectDictLabel(dict.type.order_return_status, row.returnStatus) || '-' }}
        </template>
      </el-table-column>

      <el-table-column align="center" label="保证金" min-width="120">
        <template #default="{row}">
          {{ format_thousand(row.deposit) }}
        </template>
      </el-table-column>

      <el-table-column align="center" label="违章费用" min-width="120">
        <template #default="{row}">
          {{ format_thousand(row.violationFee) }}
        </template>
      </el-table-column>

      <el-table-column align="center" label="欠租" min-width="120">
        <template #default="{row}">
          {{ format_thousand(row.rentArrears) }}
        </template>
      </el-table-column>

      <el-table-column align="center" label="尾款" min-width="120">
        <template #default="{row}">
          {{ format_thousand(row.balancePayment) }}
        </template>
      </el-table-column>

      <el-table-column align="center" label="违约金" min-width="120">
        <template #default="{row}">
          {{ format_thousand(row.defaultDeduction) }}
        </template>
      </el-table-column>

      <el-table-column align="center" label="车损" min-width="120">
        <template #default="{row}">
          {{ format_thousand(row.vehicleDamageFee) }}
        </template>
      </el-table-column>

      <el-table-column align="center" label="加速折旧费" min-width="120">
        <template #default="{row}">
          {{ format_thousand(row.depreciation) }}
        </template>
      </el-table-column>

      <el-table-column align="center" label="超里程费" min-width="120">
        <template #default="{row}">
          {{ format_thousand(row.overMileageFee) }}
        </template>
      </el-table-column>

      <el-table-column align="center" label="客户理赔款" min-width="120">
        <template #default="{row}">
          {{ format_thousand(row.rentArrears) }}
        </template>
      </el-table-column>

      <el-table-column align="center" label="其他费用" min-width="120">
        <template #default="{row}">
          {{ format_thousand(row.otherFee) }}
        </template>
      </el-table-column>

    </el-table>
  </div>
</template>

<script>
import * as outInventoryApi from '@/api/carInventory/outInventory'
export default {
  name: 'orderTable',//查询关联订单
  dicts:['order_return_status'],
  props: {
    ruleForm: {
      type: Object,
      default: {}
    },
    typeBoole: {
      type: Number,
      default: 1
    }
  },
  computed: {},
  watch: {},
  data() {
    return {};
  },
  created() {
  },
  mounted() {
  },
  methods: {
    async handleTo(val) {
      if (!val) return
      try {
        let res = await outInventoryApi.outOrderDetails(val)
        if (res.code === 200) {
          this.$router.push({
            name: 'SuborderDetail',
            query: {
              id: res.data.orderCarId,
              orderId: res.data.orderCode,
            },
          })
        }
      } catch (e) {
        console.error(e)
      }
    }
  },
};
</script>

<style scoped lang=""></style>


